// TODO: CODE REVIEW & CLEANUP!
//
// MsAv.xaml.cs
//

using System.Windows.Controls;
using HomeUX.Controls;

namespace HomeUX.ClientApp
{

public partial class MsAv : UserControl
{
    public MsAv()
    {
        InitializeComponent();
        Loaded += MsAv_Loaded;
    }

    private void MsAv_Loaded(object sender, System.Windows.RoutedEventArgs e)
    {
        TheMediaControl.TheTouchTabStrip.SelectedItemDataChanged += TheTouchTabStrip_SelectedItemDataChanged;
        TheTouchTabStrip_SelectedItemDataChanged(null, null);
    }

    private void TheTouchTabStrip_SelectedItemDataChanged(object sender, System.EventArgs e)
    {
        switch (TheMediaControl.TheTouchTabStrip.SelectedItemData)
        {

        case "TheTiVoControl":

			// bedroom
            Bedroom_HearButton.Text = "Listen to\nTiVo";
            Bedroom_HearButton.SyncPath = @"Scripts\Master Suite\Listen to TiVo";
            Bedroom_WatchButton.Text = "Watch\nTiVo";
            Bedroom_WatchButton.SyncPath = @"Scripts\Master Suite\Watch TiVo";

			// office
            Office_HearButton.Text = "Listen to\nTiVo";
            Office_HearButton.SyncPath = @"Scripts\Office\Listen to TiVo";
            break;

        case "TheMusicControl":

			// bedroom
            Bedroom_HearButton.Text = "Listen to Music";
            Bedroom_HearButton.SyncPath = @"Scripts\Master Suite\Listen to Music";
            Bedroom_WatchButton.Text = "N/A";
            Bedroom_WatchButton.SyncPath = null;

			// office
            Office_HearButton.Text = "Listen to Music";
            Office_HearButton.SyncPath = @"Scripts\Office\Listen to Music";
            break;

        case "TheDvdControl":

			// bedroom
            Bedroom_HearButton.Text = "Listen to\nDVD/CD";
            Bedroom_HearButton.SyncPath = @"Scripts\Master Suite\Listen to DVD/CD";
            Bedroom_WatchButton.Text = "Watch\nDVD/CD";
            Bedroom_WatchButton.SyncPath = @"Scripts\Master Suite\Watch DVD";

			// office
            Office_HearButton.Text = "Listen to\nDVD/CD";
            Office_HearButton.SyncPath = @"Scripts\Office\Listen to DVD/CD";
            break;

        case "TheVcrControl":

			// bedroom
            Bedroom_HearButton.Text = "Listen to\nVCR";
            Bedroom_HearButton.SyncPath = @"Scripts\Master Suite\Listen to VCR";
            Bedroom_WatchButton.Text = "Watch\nVCR";
            Bedroom_WatchButton.SyncPath = @"Scripts\Master Suite\Watch VCR";

			// office
            Office_HearButton.Text = "Listen to\nVCR";
            Office_HearButton.SyncPath = @"Scripts\Office\Listen to VCR";
            break;

        }
    }
}

}
